<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="spring" 	uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="sec" 	uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="form" 	uri="http://www.springframework.org/tags/form" %>

<%@ taglib prefix="tiles" 	uri="http://tiles.apache.org/tags-tiles" %>
<%@ taglib prefix="c"		uri="http://java.sun.com/jsp/jstl/core" %>

<%-- <%@ taglib prefix="mytest" uri="http://www.tomcat-demo.com/testing"%> --%>

<%@ page contentType="text/html; charset=utf-8" %>
<%@ page language="java" pageEncoding="utf-8"%>

<script type="text/javascript">


	var curLangRef = "${pageContext.response.locale}" + 'Value';
	var activateMenuItemName;

	function getUserNameSurname(item) {
		return item.firstName + " " + item.lastName;
	};

	function setMenuSelection(activateMenuItemName) {
 
		if (activateMenuItemName == "home") {
			$("#btHome").css("background", "#3276b1");
		}
		if (activateMenuItemName == "clienti") {
			$("#btClienti").css("background", "#3276b1");
		}
		
		if (activateMenuItemName == "anchete") {
			$("#btAnchete").css("background", "#3276b1");
		}
		
		if (activateMenuItemName == "contracte") {
			$("#btContracte").css("background", "#3276b1");
		}
		
		if (activateMenuItemName == "personal") {
			$("#btPersonal").css("background", "#3276b1");
		}		
		
		
		
		if (activateMenuItemName == "rapoarte") {
			$("#btRapoarte").css("background", "#3276b1");
		}
		if (activateMenuItemName == "fisiere") {
			$("#btFisiere").css("background", "#3276b1");
		}
		if (activateMenuItemName == "email") {
			$("#btEmail").css("background", "#3276b1");
		}
		if (activateMenuItemName == "companie") {
			$("#btCompanie").css("background", "#3276b1");
		}
		if (activateMenuItemName == "utilitati") {
			$("#btUtilitati").css("background", "#3276b1");
		}
		
		if (activateMenuItemName == "cadouri") {
			$("#btCadouri").css("background", "#3276b1");
		}
		
	}
	
function onMenuSelect(e){
	console.log("Selected: " + $(e.item).children(".k-link").text());
}	

$(document).ready(function(){

    $("#menu").kendoMenu();
    
  
    
});    
</script>


<table width="100%" border="0" style="border-width: inherit;">
  <tr>
    <td width="140px" class="k-content k-block" ><IMG  style="float: left;" alt="Magazin Financiar" src="resources/images/logotip.png" height="70px"/></td>
    <td align="center" style="min-width:600px; width: 100%; vertical-align: bottom;" >
    	<div class="k-content">
    	<div id="mainMenu">
			<ul id="menu">
				${mainMenu}
			</ul>
		</div>			
		</div>
    </td>
	<td align="center" class="k-content k-block" >
		<div id="toolbar" class="ui-widget-header ui-corner-all" style="height: 40px; text-align: center; vertical-align: middle; width: 150px">
			<a href="#">${proxyCurrentUser.userFullName}</a>
			<a href="#">${proxyCurrentUser.userBranchName}</a>
			<a href="#">${proxyCurrentUser.userRoleName}</a>
			<form name='submitRowCard' method='POST' action=''>
				<c:if test="${currentUserName != 'anonymousUser'}">
					<a href="<c:url value='j_spring_security_logout'/>">Logout</a>
				</c:if>
			</form>
		</div>	
	</td>    
  </tr>
</table>


  <style scoped>
            #mainMenu {
                width: 100%;
            }

			#menu {
                text-align: justify;
            }
                
 
        </style>



